var box = document.getElementById('box');
var target = document.getElementById('target');
var goTarget = document.getElementById('goTarget');
//增加步长的方式

var buttonList = document.querySelectorAll('button');
console.log(buttonList);
var timer = null;
buttonList[0].addEventListener('click',function(){
    moveFunctions.move(box,0);
    
})

buttonList[1].addEventListener('click',function(){

   moveFunctions.move(box,document.documentElement.clientWidth - 100);
   
   



})

console.log(target.value);

goTarget.addEventListener('click',function(){
    
    var target1 = target.value;
    if(target1 >= document.documentElement.clientWidth - parseFloat(window.getComputedStyle(box,null).width)){
        target1 = document.documentElement.clientWidth - parseFloat(window.getComputedStyle(box,null).width);
    }else if(target1 < 0){
        target1 = 0;
    }
    moveFunctions.move(box,target1);
})







